<?php 
   include("files/php/global.php"); 
   printHeader();
   session_start();
   LoadDataDb();
   loadRubrica();
   $_SESSION['NUMERI_TELEFONO']=$NUMERI_TELEFONO;
   $_SESSION['DATA_TABLE']=$DATA_TABLE;
   $_SESSION['LISTA_ALR_ENABLE_SMS']=$LISTA_ALR_ENABLE_SMS;
   $_SESSION['HOUR_IN_A_DAY']=$HOUR_IN_A_DAY;
?>

	<head>
		<link rel="stylesheet" href="style/master.css" type="text/css" media="screen" charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="style/overlay-apple.css"/> 
		<script src="files/js/jquery-1.3.min.js" type="text/javascript"></script>
		<script src="files/js/jquery.tools.min.js" type="text/javascript"> </script>
		<script src="files/js/coda.js" type="text/javascript"></script>
	</head>

 <table cellspacing="0" id="calendario">
			<thead>
				<tr>
					<th></th>
					<?php foreach ($DAY_OF_WEEK as $day) print("<th>$day</th>"); ?>
				</tr>
			</thead>
			<tbody>
				<?php
                                $val=0;
				foreach($HOUR_IN_A_DAY as $i => $v)
				{
                                        $val++;
                                        $ora="";
					if(($val % 2) != 0)
                                        {
                                            $ora=$v;
                                        print("<tr>");
                                        print("<td ROWSPAN=\"2\" >$ora</td>");
                                        }
					foreach($DAY_OF_WEEK as $k => $d)
					{
						PrintACell($d,$v);
					}
					print("</tr>");
				}
				?>
				
			
			</tbody>
		</table>
		<div class="apple_overlay" id="overlay">
			<div class="contentWrap"/>
		</div>
<script> 
$(function() {
	$("a[rel]").overlay({
		mask: 'darkred',
		effect: 'apple',
                top: 8,
		onBeforeLoad: function() {
			var wrap = this.getOverlay().find(".contentWrap");
			wrap.load(this.getTrigger().attr("href"));
		}
	});
	$("td[rel]").overlay({
		mask: 'darkgray',
		effect: 'apple',
                top: 8,
		onBeforeLoad: function() {
			var wrap = this.getOverlay().find(".contentWrap");
			wrap.load(this.getTrigger().attr("href"));
		}
	});

});

</script>
</body>
</html>